package view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import controller.viewController.ProductController;

public class DefineProduct {

	private JFrame frame;
	private JTextField textField;
	
	private ProductController pc;

	/**
	 * Launch the application.
	 */
//	public static void main(String[] args) {
//		EventQueue.invokeLater(new Runnable() {
//			public void run() {
//				try {
//					DefineProduct window = new DefineProduct();
//					window.frame.setVisible(true);
//				} catch (Exception e) {
//					e.printStackTrace();
//				}
//			}
//		});
//	}

	/**
	 * Create the application.
	 */
	public DefineProduct() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setResizable(false);
		frame.setBounds(100, 100, 730, 475);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JLabel lblProduct = new JLabel("Produkt:");
		lblProduct.setBounds(20, 33, 120, 14);
		frame.getContentPane().add(lblProduct);
		
		JLabel lblPrductDescription = new JLabel("Produkt Beschreibung:");
		lblPrductDescription.setBounds(20, 64, 120, 14);
		frame.getContentPane().add(lblPrductDescription);
		
		textField = new JTextField();
		textField.setBounds(150, 30, 290, 20);
		frame.getContentPane().add(textField);
		textField.setColumns(10);
		
		JTextArea textArea = new JTextArea();
		textArea.setBounds(150, 59, 290, 260);
		frame.getContentPane().add(textArea);
		
		JButton btnProductDefine = new JButton("Produkt definieren:");
		btnProductDefine.setBounds(20, 345, 150, 23);
		frame.getContentPane().add(btnProductDefine);
		btnProductDefine.addActionListener(action_btnProductDefine);
		
		JButton btnBack = new JButton("Zur\u00FCck");
		btnBack.setBounds(180, 345, 150, 23);
		frame.getContentPane().add(btnBack);
		btnBack.addActionListener(action_btnBack);
		
		JLabel lblNewLabel = new JLabel("PlEnTra /Produkt definieren");
		lblNewLabel.setBounds(10, 420, 694, 14);
		frame.getContentPane().add(lblNewLabel);

		frame.setVisible(true);
		
	}
	
	public ActionListener action_btnProductDefine = new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent arg0) {
		
			
		}
	};
	
	public ActionListener action_btnBack = new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent arg0) {
			
			frame.setVisible(false);
			
		}
	};



}
